#include "chanobj.h"
#include "QMessageBox"

ChanObj::ChanObj(QObject *parent) : QObject(parent)
{
}
void ChanObj::sendMsg(QWebEnginePage *page, double lng, double lat)
{
    page->runJavaScript(QString("recvMessage(%1, %2);").arg(lng).arg(lat));
}
void ChanObj::showPoint(double x, double y)
{
    QMessageBox::information(nullptr, "当前坐标", QString("%1, %2").arg(x).arg(y));
}

void ChanObj::onMsg(const QString &msg)
{
    qDebug() << msg;
}
